import 'package:cult/page/main/primary_screen_binding.dart';
import 'package:ducafe_ui_core/ducafe_ui_core.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'routes/app_routes.dart';

/// 应用程序入口点
void main() {
  runApp(const CultApplication());
}

/// 主应用程序组件
/// 使用GetX进行页面逻辑分离
class CultApplication extends StatelessWidget {
  const CultApplication({super.key});

  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      minTextAdapt: true,
      splitScreenMode: true,
      designSize: const Size(390, 844),
      builder: (context, child) {
        return GetMaterialApp(
          debugShowCheckedModeBanner: false,
          title: 'Cult',
          theme: ThemeData(
            splashColor: Colors.transparent,
            highlightColor: Colors.transparent,
            primarySwatch: Colors.blue,
          ),
          initialRoute: AppRoutes.splash,
          getPages: AppRoutes.routes,
          initialBinding: PrimaryScreenBinding(),
        );
      },
    );
  }
}
